DATA & CODES FOR "Secular Economic Changes and Bond Yields"

The results were obtained using Matlab2019A in a windows 10 enterprise environment (version 10.0.17763). The replication matlab code files include the following:

--The workspace 'NK_workspaceJS_LongRun1_1983-09-30_2019-10-01.mat' contains the data as well as initial parameter values to estimate the models for the RESTAT publication.  The data is accurately described in the published version of the paper.

--The raw data is included in the excel files US_NK_3macro (inflation, output and short rate data), usa_NK_LTsurveys (survey data), usa_inflation_swap (inflation swap data), and the matlab file usa_SNSquarter.mat (zero coupon yields).

--The main script NKstars_restat.m load data as well initial parameter values, estimate the specification used in the RESTAT publication, generate the output and save results. The script uses the following functions for the purpose of re-parametrization:
	---NK_makeSigmaSy_2.m; NK_makeSigmaSg_2.m; NK_makeSigma_tilde2.m;

--The function NK_Dynamics_3.m is used in the main script to compute the likelihood of the data. This likelihood is maximized in the main script to estimate parameters. It uses the following functions for the purpose of re-parametrization: 
	---NK_makeLWphi.m/

--The function NK_Pricing3.m is used in the likelihood function NK_Dynamics_3.m and produce the contributions of yields and inflation swaps to the likelihood.  It also reports auxiliary output, such as the pricing coefficients.

--The function NK_Output.m takes the parameter estimates and generate initial output (e.g., report parameter values and generate figure of state variables).

--The function NK_Ouutput_VarianceDecomp.m takes the parameter estimates to produce variance decomposition.  It uses several specialized functions in as intermediate steps:
	---NK_makeVarMean_crossproduct_star.m; NK_makeVarMean_crossproduct_tilde; NK_makeVarMean_crossproduct_both; NK_makeMAinfCoef.m

--The function NK_Output_ImpulseResponseFunction.m takes the parameter estimates to produce impulse response functions.  It uses several specialized functions in as intermediate steps:
	---NK_makeMAinfCoef.m;

